home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 22 / 022.d81 / haunted house (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  17KB  |  507 lines

  1. 1 print"[147]":poke53280,0:poke53281,0
  2. 10 if peek(828)<>160 then load"fader.cas.o",8,1
  3. 20 gosub700
  4. 100 gosub 500 : rem * initialize
  5. 110 on rm gosub 1000,2000,3000,4000,5000,6000,7000,8000,9000,10000,11000,12000
  6. 120 goto 110
  7. 150 goto 110
  8. 480 rem *** initialize the game ***
  9. 490 :
  10. 500 tr=-1 : fa=0 : print"[147][153]";:ch=-1:ni=0:kh=-1:bh=-1:rh=-1:wh=-1:sh=-1:ma=-1
  11. 510 poke53280,11 : poke53281,11 : rm=0 :t=rnd(-ti):dim ud(20):mh=-1:sa=-1:sw=10
  12. 520 print"   [217]ou are standing at the door of the"
  13. 530 print"house that has been reputed to be"
  14. 540 print"haunted.  [193]lthough you don't believe"
  15. 550 print"any of the stories you have heard,"
  16. 560 print"something bothers you about this place."
  17. 570 print"[194]rushing aside your silly intuitions,"
  18. 580 print"you decide to enter."
  19. 590 print:print"[212]he only entrance is to your north."
  20. 600 gosub 20000
  21. 610 if dr=0 then 600
  22. 620 if dr=1 then rm=1 : return
  23. 630 print:print"[193]fter thinking it over, you decide that"
  24. 640 print"leaving your mission is not an option." : goto590
  25. 698 rem *** title page ***
  26. 699 :
  27. 700 print"[147]"chr$(142)
  28. 710 print" the                                    "
  29. 720 print"  [209]  [209] [209][209][209][209] [209]  [209] [209]  [209] [209][209][209][209] [209][209][209][209] [209][209][209]    "
  30. 730 print"  [209]  [209] [209]  [209] [209]  [209] [209][209] [209]  [209][209]  [209]    [209]  [209]   "
  31. 740 print"  [209][209][209][209] [209][209][209][209] [209]  [209] [209][209][209][209]  [209][209]  [209][209][209]  [209]  [209]   "
  32. 750 print"  [209]  [209] [209]  [209] [209]  [209] [209] [209][209]  [209][209]  [209]    [209]  [209]   "
  33. 760 print"  [209]  [209] [209]  [209]  [209][209]  [209]  [209]  [209][209]  [209][209][209][209] [209][209][209]  "
  34. 770 print"       [209]  [209]  [209][209]  [209]  [209] [209][209][209][209] [209][209][209][209]    "
  35. 780 print"       [209]  [209] [209]  [209] [209]  [209] [209]    [209]           "
  36. 790 print"       [209][209][209][209] [209]  [209] [209]  [209] [209][209][209][209] [209][209][209]         "
  37. 800 print"       [209]  [209] [209]  [209] [209]  [209]    [209] [209]           "
  38. 810 print"       [209]  [209]  [209][209]   [209][209]  [209][209][209][209] [209][209][209][209]        "
  39. 820 print"by joe garrett
  40. 830 [153]"    loadstar is not public domain."
  41. 840 [153]"  please respect the author's bytes."
  42. 850 [153]"    >>> press a key <<<"
  43. 890 [158]828:[161]t$
  44. 900 [142]
  45. 980 [143] *** the entry ***
  46. 990 :
  47. 1000 [153]:[153]"(NULL)ou are now in the entry hall of the "
  48. 1010 [153]"house.  (NULL)he dust irritates your nose "
  49. 1020 [153]"and cobwebs hang from the ceiling.  atn   stairway is to your north."
  50. 1030 [153]"str$oors are on all other sides."
  51. 1035 [139] fo [167] [153]"(NULL)he front door is wide open."
  52. 1040 [141] 20000
  53. 1042 [139] gt [167] dth[178]2:[137]30000
  54. 1045 [139] lk [167] 1000
  55. 1046 [139] us [167] [141]26000:[153]"(NULL)othing happened.":[137]1040
  56. 1047 [139] dr[178]0 [167] 1040
  57. 1050 [139] dr[178]2 [167] rm[178]5:[142]
  58. 1060 [139] dr[178]4 [167] rm[178]3:[142]
  59. 1070 [139] dr[178]1 [167] [153]"chr$oing up the stairs";:[141]28700  : rm[178]12:[142]
  60. 1075 [139] dr[178]3[175]fo [167] [137]55000
  61. 1080 [139]dr[178]3[167][153]"right$t's locked. (NULL)ou should never have      entered.":[137]1040
  62. 1980 [143] *** lower closet  ***
  63. 1990 :
  64. 2000 [153]"(NULL)ower closet."
  65. 2010 [153]"(NULL)hese clothes are only seen in movies!"
  66. 2020 [153]"chr$lowing letters on the wall read:"
  67. 2030 [153]"   def(NULL)(NULL)(NULL)closeatn(NULL)valcloselen(NULL)(NULL)(NULL)valstr$close(NULL)right$(NULL)left$close(NULL)left$valclosepeek(NULL)atnlen(NULL)close(NULL)(NULL)(NULL)(NULL)"
  68. 2040 [153]"   len(NULL)(NULL)(NULL)val.close(NULL)left$val(NULL)valcloseright$(NULL)close(NULL)(NULL)(NULL)close(NULL)(NULL)close(NULL)val(NULL)(NULL)(NULL)(NULL).print"
  69. 2050 [153]"(NULL)here is a safe here."
  70. 2055 [139] so [167] [153]"right$t is open."
  71. 2060 [153]"(NULL)he only exit is north."
  72. 2100 [141] 20000
  73. 2105 [139] dr[178]2[176]dr[178]3[176]dr[178]4[167][141]27000:[137]2100
  74. 2107 [139] dr[178]1 [167] rm[178]3:[142]
  75. 2110 [139] lk [167] 2000
  76. 2120 [139] ci [167] 2100
  77. 2130 [139] gt [167] [153]"(NULL)ou can't get the safe.":[137]2100
  78. 2140 [139] us [167] [141] 26000
  79. 2150 [139] us$[178]"knife" [167]bk[178][171]1
  80. 2160 [139] bk [167]ri$[178]"knife":[141]28000:ai$[178]"bent knife":[141]28500
  81. 2170 [139] bk [167] [153]"(NULL)he safe bent the knife!":bk[178]0: [137]2100
  82. 2180 [139] us [175] us$[178]"combination"[167][141]50000:[142]
  83. 2700 [153]"(NULL)o effect.":[137]2100
  84. 3000 [153]"(NULL)he lower bedroom."
  85. 3010 [153]"peekefore you is a desk and a twin bed."
  86. 3020 [153]"valxits are north, east, and south.
  87. 3030 gosub 20000
  88. 3040 if lk then 3000
  89. 3050 if ci then 3030
  90. 3060 if dr=4then gosub27000:goto3030
  91. 3070 if dr=1 then rm=6:return
  92. 3080 if dr=2 then rm=1:return
  93. 3090 if dr=3 then rm=2:return
  94. 3100 if gt then print"[212]he furniture would only weigh you down.":goto3030
  95. 3110 if us then gosub26000
  96. 3120 print"[206]o effect.":goto3030
  97. 3980 rem *** the cupboard ***
  98. 3990 :
  99. 4000 print"[212]he kitchen pantry."
  100. 4010 print"[201]t's dark, dusty and full of broken "
  101. 4020 print"shelves. [212]he only exit is north."
  102. 4030 if bh thenprint"[217]ou barely notice a broom behind one of the shelves."
  103. 4040 gosub 20000:ifcithen4040
  104. 4042 if us then gosub 26000:ifus$="" then 4040
  105. 4043 if us and not mc then print"[212]he "us$" had no effect.":goto4040
  106. 4044 if us and mc then print"[193] secret!!!":ai$="treasure":gosub28500:goto55000
  107. 4045 if lk then 4000
  108. 4050 q= gt and bh
  109. 4055 if q then bh=0:ai$="broom":gosub28500:print"[194]room taken.":goto4040
  110. 4060 if dr=1 then rm=5:return
  111. 4070 if dr<>1 then gosub27000:goto4040
  112. 4980 rem *** kitchen ***
  113. 4990 :
  114. 5000 print"[212]he [203]itchen."
  115. 5010 print"[211]mall creatures scatter as you inspect"
  116. 5020 print"the cluttered kitchen. "
  117. 5030 if kh then print"[212]here is a knife on the table."
  118. 5035 if kd thenprint"[211]ome maniac has damaged the kitchen witha knife."
  119. 5037 if mz thenprint"[212]he dust from your sweeping makes you   sneeze."
  120. 5038 print"[212]here are exits to your north, west and south."
  121. 5040 gosub 20000
  122. 5050 if lk then 5000
  123. 5055 if gt and kh then 5110
  124. 5057 if gt and  not kh then 5120
  125. 5058 if us then gosub26000:goto5130
  126. 5060 if dr=0 then 5040
  127. 5070 if dr=4 then rm=1:return
  128. 5080 if dr=1 then rm=7:return
  129. 5090 if dr=3 then rm=4:return
  130. 5100 if dr=2 then gosub27000:goto5040
  131. 5110 print"[203]nife taken.":ni=ni+1:iv$(ni)="knife":kh=0: goto5040
  132. 5120 print"[212]he little creatures are worthless.     [204]eave them alone.":goto5040
  133. 5129 : rem *** use kitchen stuff
  134. 5130 if kcthenprint"[212]he knife does significant damage to thekitchen.":kd=-1
  135. 5140 if bcthenprint"[212]he dust flies and makes you sneeze more.":mz=-1
  136. 5150 if dc thenprint"[212]he little creatures snatch the bat and"
  137. 5160 if dc thenprint"drag it into a hole in the wall."
  138. 5170 if dc thenri$="bat":gosub28000
  139. 5180 print"[217]ou're wasteing time.":goto5040
  140. 5980 rem *** the bathroom ***
  141. 5990 :
  142. 6000 print"[212]he lower bathroom."
  143. 6010 print"[217]ou see ordinary bathroom facilities."
  144. 6020 if wh then print"[212]here is a witch in here that is not"
  145. 6030 if wh then print"pleased with your presence."
  146. 6040 if gl then print"[212]here is a piece of gold here."
  147. 6045 print"[211]outh is the only exit."
  148. 6050 gosub 20000
  149. 6060 if lk then 6000
  150. 6070 if ci then 6050
  151. 6072 if gl and gt then ai$="gold":gosub28500:print"[199]old taken.":gl=0:goto6050
  152. 6074 if wh and gt then print"[196]on't even try to get the witch!":goto6050
  153. 6080 if dr=2ordr=1ordr=4 thengosub27000:goto6050
  154. 6090 q = (dr=3) and wh
  155. 6092 z = (dr=3) and not(wh)
  156. 6100 if q then dth=3:goto30000
  157. 6102 if z then rm=3:return
  158. 6110 if us then wu=wu+1:gosub 26000
  159. 6115 if wu=3 and wh then 6100
  160. 6120 if not wh then print"[206]othing happened.":goto6050
  161. 6125 if wh and mc then print"[211]he knows what she looks like!":goto6050
  162. 6130 if not(wh and us$="broom")thenprint"[212]he witch is agitated further.":goto6050
  163. 6140 print"[193] big smile appears on the witches face."
  164. 6150 print"[145][211]he accepts the broom and flys away":wh=0:ri$="broom":gosub28000
  165. 6155 print"leaving a piece of gold behind.":gl=-1
  166. 6160 goto6050
  167. 6980 rem *** the dining room ***
  168. 6990 :
  169. 7000 print"[21